package com.test.mcdonald;

import java.util.ArrayList;
import java.util.List;

import com.test.mcdonald.GlobalSettings.TypeMenu;

public class Table {
	
	private int dishCount;
	private List<TypeMenu> listItemsMenu = new ArrayList<TypeMenu>();
	TypeMenu typeMenu;
	
	Table(TypeMenu typeMenu){
		this.typeMenu = typeMenu;
		this.dishCount=0;
	}
	
	boolean getDish(){
		this.dishCount -= 1;
		if (listItemsMenu.size() > 0) {
			listItemsMenu.remove(listItemsMenu.size() - 1);
			return true;
		} else {
			return false;
		}
		
	}
	void addDish(){
		this.dishCount += 1;
	}
	
	int getDishCount(){
		return this.dishCount;
	}
	
}
